

<!doctype html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>skidl.config_ module &#8212; SKiDL 2.2.0 documentation</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
    <link rel="stylesheet" type="text/css" href="../_static/bizstyle.css?v=a66e137f" />
    
    <script src="../_static/documentation_options.js?v=b21de401"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../_static/bizstyle.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <!--[if lt IE 9]>
    <script src="_static/css3-mediaqueries.js"></script>
    <![endif]-->
  </head><body>
    <h1 id="site-title"><a href="../../../"><img src="../../../images/slim_banner.png" width="100%"></a></h1>
    
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SKiDL 2.2.0 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">skidl.config_ module</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-skidl.config_">
<span id="skidl-config-module"></span><h1>skidl.config_ module<a class="headerlink" href="#module-skidl.config_" title="Link to this heading">¶</a></h1>
<p>Configuration management for SKiDL.</p>
<p>This module provides classes for loading, storing, and accessing SKiDL configuration
parameters. Configuration data is stored in JSON files and includes settings for
default tools, library search paths, footprint search paths, and backup library options.
The module supports configuration hierarchies with system, user, and project-specific
settings that are merged according to priority.</p>
<dl class="py class">
<dt class="sig sig-object py" id="skidl.config_.Config">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">skidl.config_.</span></span><span class="sig-name descname"><span class="pre">Config</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cfg_file_name</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">dirs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/config_.html#Config"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.config_.Config" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#dict" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p>
<p>Base class for managing configuration parameters.</p>
<p>This class extends the dictionary to store configuration parameters and provides
methods to load configuration from JSON files and save it back to disk.
Configuration from multiple sources can be merged with intelligent handling
of nested dictionaries.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cfg_file_name</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a>) – Name of the configuration file.</p></li>
<li><p><strong>*dirs</strong> – Directories to search for configuration files.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="skidl.config_.Config.load">
<span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">dirs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/config_.html#Config.load"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.config_.Config.load" title="Link to this definition">¶</a></dt>
<dd><p>Load configuration from JSON files in the specified directories.</p>
<p>This method looks for the configuration file in each directory and merges
the settings found in each file, with later directories taking precedence.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>*dirs</strong> – Directories to search for configuration files.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.config_.Config.merge">
<span class="sig-name descname"><span class="pre">merge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">merge_dct</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/config_.html#Config.merge"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.config_.Config.merge" title="Link to this definition">¶</a></dt>
<dd><p>Merge another dictionary into this configuration.</p>
<p>This method recursively merges dictionaries, preserving nested structures
where possible.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>merge_dct</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#dict" title="(in Python v3.13)"><em>dict</em></a>) – Dictionary to merge into this configuration.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.config_.Config.store">
<span class="sig-name descname"><span class="pre">store</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dir</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'.'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/config_.html#Config.store"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.config_.Config.store" title="Link to this definition">¶</a></dt>
<dd><p>Store the current configuration as a JSON file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>dir</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a><em>, </em><em>optional</em>) – Directory to store the configuration file in.
Defaults to the current directory.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="skidl.config_.SkidlConfig">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">skidl.config_.</span></span><span class="sig-name descname"><span class="pre">SkidlConfig</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tool</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/config_.html#SkidlConfig"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.config_.SkidlConfig" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skidl.config_.Config" title="skidl.config_.Config"><code class="xref py py-class docutils literal notranslate"><span class="pre">Config</span></code></a></p>
<p>Configuration class specialized for SKiDL.</p>
<p>This class extends the base Config class with SKiDL-specific defaults and
behaviors, such as managing tool selection, library paths, and footprint paths.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>tool</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a>) – Default tool/backend to use if not specified in config files.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="skidl.config_.SkidlConfig.store">
<span class="sig-name descname"><span class="pre">store</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dir</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/config_.html#SkidlConfig.store"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.config_.SkidlConfig.store" title="Link to this definition">¶</a></dt>
<dd><p>Store the current SKiDL configuration as a JSON file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>dir</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a><em>, </em><em>optional</em>) – Directory to store the configuration file in.
Defaults to the SKiDL storage directory.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  <div>
    <h3><a href="../index.html">Table of Contents</a></h3>
    <ul>
<li><a class="reference internal" href="#">skidl.config_ module</a><ul>
<li><a class="reference internal" href="#skidl.config_.Config"><code class="docutils literal notranslate"><span class="pre">Config</span></code></a><ul>
<li><a class="reference internal" href="#skidl.config_.Config.load"><code class="docutils literal notranslate"><span class="pre">Config.load()</span></code></a></li>
<li><a class="reference internal" href="#skidl.config_.Config.merge"><code class="docutils literal notranslate"><span class="pre">Config.merge()</span></code></a></li>
<li><a class="reference internal" href="#skidl.config_.Config.store"><code class="docutils literal notranslate"><span class="pre">Config.store()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#skidl.config_.SkidlConfig"><code class="docutils literal notranslate"><span class="pre">SkidlConfig</span></code></a><ul>
<li><a class="reference internal" href="#skidl.config_.SkidlConfig.store"><code class="docutils literal notranslate"><span class="pre">SkidlConfig.store()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>

  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/rst_output/skidl.config_.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SKiDL 2.2.0 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">skidl.config_ module</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
    &#169; Copyright 2016-2025, Dave Vandenbout.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.
    </div>
  </body>
</html>